package com.cinema.Bean;

public class Admin implements java.io.Serializable {
	private String adminId; // 管理员id
	private String adminName; // 管理员姓名
	private String adminPwd; // 管理员密码
	public String getAdminId() {
		return adminId;
	}
	public void setAdminId(String adminId) {
		this.adminId = adminId;
	}
	public String getAdminName() {
		return adminName;
	}
	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}
	public String getAdminPwd() {
		return adminPwd;
	}
	public void setAdminPwd(String adminPwd) {
		this.adminPwd = adminPwd;
	}
	
	public boolean equals(Object obj) {
		if (obj == null)// 非空性
			return false;
		if (obj == this)
			return false;// 自反性
		if (obj instanceof Admin) {
			// 向下转型
			Admin u = (Admin) obj;
			// 利用数据库的规则，主键相等，即数据相等
			return u.adminId.equals(this.adminId);
		}
		return false;
	}

	public int hashCode() {
		return this.adminId.hashCode();// 返回主键的hashCode
	}
	
	@Override
	public String toString() {
		return "Admin [adminId=" + adminId + ", adminName=" + adminName + ", adminPwd=" + adminPwd + "]";
	}
	
	public Admin(String adminId, String adminName, String adminPwd) {
		super();
		this.adminId = adminId;
		this.adminName = adminName;
		this.adminPwd = adminPwd;
	}
	public Admin() {
		super();
	}
}
